const initialState = {
    all: [],
    foo: "chosen"
  };
  
  const all = (state = [], action) => {
    let {type,payload} =action;
    switch(type){
      case "GET_ALL_TYPE":
        return [...payload];
      default:
        return state;
    }
  };
  
  export default (state = initialState, action) => {
    return {
      all: all(state.all, action),
      foo: state.foo
    };
  };
  